﻿<!doctype html>
<html>
<!-- InstanceBegin template="/Templates/template1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>会员账户</title>
<!-- InstanceEndEditable -->
<script type="text/javascript" src="../js/common.js"></script>
<link href="../css/Pager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/gbRst.js"></script>
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/checkLogin.js"></script>
<script type="text/javascript" src="../js/jquery.pager.js"></script>
<script type="text/javascript" src="../js/shopSelecterNew.js"></script>
<script type="text/javascript" src="../js/pagination.js"></script>
<script type="text/javascript" src="../js/find.js"></script>
<link href="../css/style.css" type="text/css" rel="stylesheet" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<script type="text/javascript" >

$(function(){
	refreshInput($(".serWrapper"));
	$("#shopIsChoosed").click(function(){
		if($("#shopIsChoosed").is(":checked")){
			$("#shopName").attr("disabled",false);
			$("#research").attr("disabled",false);
			
		}else{
			$("#shopName").attr("disabled",true);

		}
	});
})
var pagecount = 0;
var count = 0;
var shopId="shopId";



function InitTable(pageIndex ) {
	if(IsNotEmpty(pageIndex)){
		_pageIndex = pageIndex;
	}
	var phone=$("#phone").val().replace(/\s/gi,'');	
	var code=$("#code").val().replace(/\s/gi,'');
	var status=$("#status").val();
	var dtBegin=$("#dtBegin").val();
	var dtEnd=$("#dtEnd").val();
	var shopId="";
	var param='phone='+phone+'&code='+code+"&status="+status+"&dtBegin="+dtBegin+"&dtEnd="+dtEnd;
	if($("#shopIsChoosed").is(":checked")){	
		shopId=$("#shopName").val();
		
		if(shopId!=""&&shopId!=null){
			param+="&shopId="+shopId;
		}
	}
	
	var dt = _findInfo("../member/find/memberList/" + ( _pageIndex -1 ) + "/10", param);
				if(dt.state==0){
					var params = new Array("CreateFileTime", "MemberCardNo","name","mp", "IDNumber", "Birthday", "IntegralAmount", "CashCouponAmount",  "staName");							
					_loadInfo(dt, "memberList", params);
					_loadPage("pager", _pageIndex, 10, dt, InitTable,"NoResult")
					$("#sup").html("共"+dt.result.len+"条");		
				}	
}


function search(){
	InitTable(1);
}

function  downRescouse(){
	var phone=$("#phone").val().replace(/\s/gi,'');	
	var code=$("#code").val().replace(/\s/gi,'');
	var status=$("#status").val();
	var dtBegin=$("#dtBegin").val();
	var dtEnd=$("#dtEnd").val();
	var shopId="";
	var param='phone='+phone+'&code='+code+"&status="+status+"&dtBegin="+dtBegin+"&dtEnd="+dtEnd+"&downType=12";
	if($("#shopIsChoosed").is(":checked")){
	shopId=$("#shopName").val();
		
		if(shopId!=""&&shopId!=null){
			param+="&shopId="+shopId;
		}
	}
	
	
	window.location.href="../csvdown/down/csv/down?"+param

}


</script>
</head>

<body>

<!-- InstanceBeginEditable name="EditRegion3" --> 
<script type="text/javascript" src="../js/doubleDate2.0.js"></script> 
<script type="text/javascript">
$(function(){
	
	$('.doubledate').kuiDate({
		className:'doubledate',
		isDisabled: "0"  // isDisabled为可选参数，“0”表示今日之前不可选，“1”标志今日之前可选
	});

});
</script>
<div class="container" id="container">
  <div class="container_R fr">
    <div class="place">会员账户</div>
    <div class="member_search">
      <p><span>
        <input type="checkbox" id="shopIsChoosed" style="width:auto;height:auto;border:none;">
        店面：</span>
        <select id="shopName" onclick="openShopListPanel(this)" style=";height:20px;" disabled="disabled">
        </select>
        <span>起始日期：</span>
        <input type="text" readonly class="doubledate ipticon"  id="dtBegin"/>
        <span>截止时间：</span>
        <input type="text" readonly class="doubledate ipticon" id="dtEnd"/>
      </p>
      <p>
        <span>卡号：</span>
        <input type="text" id="code" class="absoluteTxt">
      <span>手机号：</span>
      <input type="text" id="phone" class="absoluteTxt">
      <span>状态：</span>
      <select id="status">
        <option value="0">所有</option>
        <option value="2">正常</option>
        <option value="1">非正常</option>
      </select>
      <input type="button" value="查询" class="btn" onclick="search()">
      </p>
    </div>
    <table width="100%" class="member_list" cellpadding="0" cellspacing="1" border="0" id="memberList">
      <caption>
      <strong>会员列表 <span id="sup">共0条</span> </strong><a href="javascript:void(0)" onclick="downRescouse()">导出数据</a>
      </caption>
      <thead>
        <tr>
          <th>入会日期</th>
          <th>卡号</th>
          <th>姓名</th>
          <th>手机</th>
          <th>身份证</th>
          <th>生日</th>
          <th>积分</th>
          <th>现金账户</th>
          <th>状态</th>
        </tr>
      </thead>
      <tbody></tbody>
    </table>
     <div id="NoResult"  class="Nothing" style="text-align:center;display: none;">无符合条件的数据！</div>
    <div id="pager" style="float: right;"></div>
  </div>
  <div class="fc"></div>
</div>
<!-- InstanceEndEditable --> 
<script type="text/javascript" src="../js/header.js"></script> 
<script type="text/javascript" src="../js/left.js"></script> 
<script type="text/javascript" src="../js/footer.js"></script> 
<script type="text/javascript">
clearThis("absoluteTxt");
showTab(4,2);
</script>
</body>
<!-- InstanceEnd -->
</html>
